using System;
using System.Data;
using System.Data.SqlClient;
using System.Collections.Generic;
using System.Text;
using DuMez.DAL;

public class MezunTip : IDisposable
{
    #region Fields
    private int _MezunTipId;
    private string _MezunTips;

    #endregion

    #region Properties
    public int MezunTipId
    {
        get { return _MezunTipId; }
        set { _MezunTipId = value; }
    }

    public string MezunTips
    {
        get { return _MezunTips; }
        set { _MezunTips = value; }
    }
    #endregion

    #region Constructor


    public MezunTip()
    {
    }
    #endregion

    #region IDisposable Members
    public void Dispose()
    {

    }
    #endregion

    #region Methods

    public static bool MezunTipEkle(string MezunTip)
    {
        bool result = false;

        result = SqlUtility.ExecuteNonQuery("dbo.DUMEZ_MEZUN_TIP_EKLE '" + MezunTip.ToUpper() + "'");

        return result;
    }

    public static bool MezunTipSil(int MezunTipID)
    {

        bool result = false;

        result = SqlUtility.ExecuteNonQuery("dbo.DUMEZ_MEZUN_TIP_SIL " + MezunTipID + "");

        return result;
    }

    public static bool MezunTipGuncelle(MezunTip mt)
    {
        bool result = false;
        result = SqlUtility.ExecuteNonQuery("dbo.DUMEZ_MEZUN_TIP_GUNCELLE '" + mt.MezunTips + "'," + mt.MezunTipId + "");
        return result;
    }

    public static DataTable MezunTipGetir()
    {
        return SqlUtility.ExecuteDataTable("Select * from MezunTip");
    }


    #endregion
}
